import Vue from 'vue'
import Router from 'vue-router'
import Layout from '../components/Layout'
import Mission from '../pages/Mission'
import AddMission from '../pages/AddMission'
import Message from '../pages/Message'
import Explore from '../pages/Explore'
import User from '../pages/User'
import Login from '../pages/Login'

Vue.use(Router)

export default new Router({
  routes : [{
      path: '/',
      redirect: '/Mission',
      component: Layout,
      children: [
      {
          path: 'Mission',
          name: 'Mission',
          component: Mission
      },
      {
          path: 'Message',
          name: 'Message',
          component: Message
      },
      {
          path: 'AddMission',
          name: 'AddMission',
          component: AddMission
      },
      {
          path: 'Explore',
          name: 'Explore',
          component: Explore
      },
      {
          path: 'User',
          name: 'User',
          component: User
      }
      ]
  },{
    path: '/login',
    component: Login
  }]
})
